fix: correct sudo build and add PR CI checks#8
Merged
megheaiulian merged 2 commits intomainfrom Feb 10, 2026
Merged
Conversation
Fix two build failures: 1. chmod 4755 glob ./nix/store/*-sudo-*/bin/sudo matched nothing because symlinkJoin creates FHS symlinks (./bin/sudo), not a nix store tree. Changed to chmod 4755 ./bin/sudo — fakeroot records the permission and tar --hard-dereference preserves it. 2. writeTextDir etc/sudoers was silently ignored because symlinkJoin kept the sudo package's own etc/sudoers (first writer wins). Moved sudoers creation into fakeRootCommands where we rm the symlink and write our own file with @includedir /etc/sudoers.d.
Add a CI workflow that triggers on pull requests and runs build-only checks (no push) for all three images: base (docker build), nix (nix build), and devops (docker build). This ensures build failures are caught during code review rather than after merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the nix image build failure from #7 and adds CI checks on pull requests so build failures are caught before merge.
Changes
1. Fix sudo setuid path (
flake.nix)The
chmod 4755 ./nix/store/*-sudo-*/bin/sudoglob matched nothing becausesymlinkJoincreates FHS symlinks (./bin/sudo), not a./nix/store/tree. Changed tochmod 4755 ./bin/sudo—fakerootrecords the permission andtar --hard-dereferencepreserves it in the Docker layer.2. Fix sudoers file conflict (
flake.nix)The
writeTextDir "etc/sudoers"inuserSetupwas silently ignored becausesymlinkJoinkept thesudopackage's ownetc/sudoers(first writer wins inlndir). Moved sudoers creation intofakeRootCommandswhere wermthe symlink and write our own file with@includedir /etc/sudoers.d.3. Add PR CI workflow (
ci.yml)New
.github/workflows/ci.ymlthat triggers on pull requests and runs build-only checks (no push, no login, no attestation) for all three images:docker build ./images/basenix build ./images/nix#dockerImagedocker build ./images/devopsThis ensures build failures like the one in #7 are caught during code review.